This relates generally to compression of images, including still images and video images, using discrete cosine transform (DCT). More particularly, it relates generally to detecting artifacts resulting from the lossy nature of quantization of discrete cosine transform coefficients.
Conventional discrete cosine transform based video encoder divides each frame into non-overlapping squares called macroblocks. Each macroblock can be processed in either an intra or inter mode. In the intra mode, the encoder uses reconstructed data of only the current frame. In the inter mode, the encoder uses data from previously processed frames as well.
Data obtained in the intra and inter modes is denoted by the term “prediction error”. The prediction error should be divided into W*W blocks for further discrete cosine transform and transform coefficients quantization. A typical value of W is eight. Data is recovered using an inverse discrete cosine transform applied to the dequantized discrete DCT coefficients. Applying quantization-dequantization procedures leads to data losses. Thus, the difference between original and reconstructed data will be called “quantization noise”. Quantization noise leads to a specific visual error called an “artifact.” Among the artifacts are blocking, ringing artifacts, which are vertical or horizontal bars within a block and mosquito noise, which looks like a cloud of insects around the strong edges in the reconstructed image.